import { createApp } from 'vue';
import { createPinia } from 'pinia';
import plugins from './config/plugins';
import '@/assets/scss/_base.scss';

import App from './App.vue';
import router from './router';

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn.mjs'
// import 'element-plus/dist/index.css'  //如果不需要自定义主题色，放开此行，删除下行
import './assets/scss/element.scss'
import * as ElIcons from '@element-plus/icons-vue'

//引入公用组件
import Header from '@/components/Header/index.vue';
import SideBar from '@/components/SideBar/index.vue';




const app = createApp(App);
app.use(createPinia());
app.use(router);
app.use(plugins, router);
app.use(ElementPlus,{locale:zhCn});

//注册公用组件
for (const [key, component] of Object.entries(ElIcons)) {
    app.component(key, component)
}
app.component('Header', Header);
app.component('SideBar', SideBar);

app.mount('#app');
